package com.benio.ycfdisplayer.fresco.photoview;

import android.graphics.Bitmap;
import android.graphics.drawable.Drawable;
import android.support.annotation.NonNull;

import com.benio.ycfdisplayer.fresco.FrescoTarget;

/**
 * An {@link FrescoTarget} for {@link FrescoPhotoViewSupport}
 * Fresco加载图片到PhotoView时使用
 * Created by zhangzhibin on 2016/10/9.
 */
public class PhotoViewTarget extends FrescoTarget<FrescoPhotoViewSupport> {

    public PhotoViewTarget(@NonNull FrescoPhotoViewSupport view) {
        super(view);
    }

    @Override
    protected void setDrawableInto(Drawable drawable, FrescoPhotoViewSupport view) {
        view.setDrawable(drawable);
    }

    @Override
    protected void setBitmapInto(Bitmap bitmap, FrescoPhotoViewSupport view) {
        view.setBitmap(bitmap);
    }
}
